Integrand size = 18, antiderivative size = 203 \[ \int \frac {c+d x}{a+b \cosh (e+f x)} \, dx=\frac {(c+d x) \log \left (1+\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}-\frac {(c+d x) \log \left (1+\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}+\frac {d \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^2}-\frac {d \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^2} \]
[Out]
Time = 0.26 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {3401, 2296, 2221, 2317, 2438} \[ \int \frac {c+d x}{a+b \cosh (e+f x)} \, dx=\frac {(c+d x) \log \left (\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}+1\right )}{f \sqrt {a^2-b^2}}-\frac {(c+d x) \log \left (\frac {b e^{e+f x}}{\sqrt {a^2-b^2}+a}+1\right )}{f \sqrt {a^2-b^2}}+\frac {d \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{f^2 \sqrt {a^2-b^2}}-\frac {d \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{f^2 \sqrt {a^2-b^2}} \]
[In]
[Out]
Rule 2221
Rule 2296
Rule 2317
Rule 2438
Rule 3401
Rubi steps \begin{align*} \text {integral}& = 2 \int \frac {e^{e+f x} (c+d x)}{b+2 a e^{e+f x}+b e^{2 (e+f x)}} \, dx \\ & = \frac {(2 b) \int \frac {e^{e+f x} (c+d x)}{2 a-2 \sqrt {a^2-b^2}+2 b e^{e+f x}} \, dx}{\sqrt {a^2-b^2}}-\frac {(2 b) \int \frac {e^{e+f x} (c+d x)}{2 a+2 \sqrt {a^2-b^2}+2 b e^{e+f x}} \, dx}{\sqrt {a^2-b^2}} \\ & = \frac {(c+d x) \log \left (1+\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}-\frac {(c+d x) \log \left (1+\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}-\frac {d \int \log \left (1+\frac {2 b e^{e+f x}}{2 a-2 \sqrt {a^2-b^2}}\right ) \, dx}{\sqrt {a^2-b^2} f}+\frac {d \int \log \left (1+\frac {2 b e^{e+f x}}{2 a+2 \sqrt {a^2-b^2}}\right ) \, dx}{\sqrt {a^2-b^2} f} \\ & = \frac {(c+d x) \log \left (1+\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}-\frac {(c+d x) \log \left (1+\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}-\frac {d \text {Subst}\left (\int \frac {\log \left (1+\frac {2 b x}{2 a-2 \sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{e+f x}\right )}{\sqrt {a^2-b^2} f^2}+\frac {d \text {Subst}\left (\int \frac {\log \left (1+\frac {2 b x}{2 a+2 \sqrt {a^2-b^2}}\right )}{x} \, dx,x,e^{e+f x}\right )}{\sqrt {a^2-b^2} f^2} \\ & = \frac {(c+d x) \log \left (1+\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}-\frac {(c+d x) \log \left (1+\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f}+\frac {d \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^2}-\frac {d \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^2} \\ \end{align*}
Time = 0.09 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.75 \[ \int \frac {c+d x}{a+b \cosh (e+f x)} \, dx=\frac {f (c+d x) \left (\log \left (1+\frac {b e^{e+f x}}{a-\sqrt {a^2-b^2}}\right )-\log \left (1+\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )\right )+d \operatorname {PolyLog}\left (2,\frac {b e^{e+f x}}{-a+\sqrt {a^2-b^2}}\right )-d \operatorname {PolyLog}\left (2,-\frac {b e^{e+f x}}{a+\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} f^2} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. \(436\) vs. \(2(183)=366\).
Time = 0.14 (sec) , antiderivative size = 437, normalized size of antiderivative = 2.15
method | result | size |
risch | \(\frac {2 c \arctan \left (\frac {2 b \,{\mathrm e}^{f x +e}+2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{f \sqrt {-a^{2}+b^{2}}}+\frac {d \ln \left (\frac {-b \,{\mathrm e}^{f x +e}+\sqrt {a^{2}-b^{2}}-a}{-a +\sqrt {a^{2}-b^{2}}}\right ) x}{f \sqrt {a^{2}-b^{2}}}-\frac {d \ln \left (\frac {b \,{\mathrm e}^{f x +e}+\sqrt {a^{2}-b^{2}}+a}{a +\sqrt {a^{2}-b^{2}}}\right ) x}{f \sqrt {a^{2}-b^{2}}}+\frac {d \ln \left (\frac {-b \,{\mathrm e}^{f x +e}+\sqrt {a^{2}-b^{2}}-a}{-a +\sqrt {a^{2}-b^{2}}}\right ) e}{f^{2} \sqrt {a^{2}-b^{2}}}-\frac {d \ln \left (\frac {b \,{\mathrm e}^{f x +e}+\sqrt {a^{2}-b^{2}}+a}{a +\sqrt {a^{2}-b^{2}}}\right ) e}{f^{2} \sqrt {a^{2}-b^{2}}}+\frac {d \operatorname {dilog}\left (\frac {-b \,{\mathrm e}^{f x +e}+\sqrt {a^{2}-b^{2}}-a}{-a +\sqrt {a^{2}-b^{2}}}\right )}{f^{2} \sqrt {a^{2}-b^{2}}}-\frac {d \operatorname {dilog}\left (\frac {b \,{\mathrm e}^{f x +e}+\sqrt {a^{2}-b^{2}}+a}{a +\sqrt {a^{2}-b^{2}}}\right )}{f^{2} \sqrt {a^{2}-b^{2}}}-\frac {2 d e \arctan \left (\frac {2 b \,{\mathrm e}^{f x +e}+2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{f^{2} \sqrt {-a^{2}+b^{2}}}\) | \(437\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 473 vs. \(2 (181) = 362\).
Time = 0.26 (sec) , antiderivative size = 473, normalized size of antiderivative = 2.33 \[ \int \frac {c+d x}{a+b \cosh (e+f x)} \, dx=\frac {b d \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} {\rm Li}_2\left (-\frac {a \cosh \left (f x + e\right ) + a \sinh \left (f x + e\right ) + {\left (b \cosh \left (f x + e\right ) + b \sinh \left (f x + e\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + b}{b} + 1\right ) - b d \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} {\rm Li}_2\left (-\frac {a \cosh \left (f x + e\right ) + a \sinh \left (f x + e\right ) - {\left (b \cosh \left (f x + e\right ) + b \sinh \left (f x + e\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + b}{b} + 1\right ) + {\left (b d e - b c f\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} \log \left (2 \, b \cosh \left (f x + e\right ) + 2 \, b \sinh \left (f x + e\right ) + 2 \, b \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + 2 \, a\right ) - {\left (b d e - b c f\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} \log \left (2 \, b \cosh \left (f x + e\right ) + 2 \, b \sinh \left (f x + e\right ) - 2 \, b \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + 2 \, a\right ) + {\left (b d f x + b d e\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} \log \left (\frac {a \cosh \left (f x + e\right ) + a \sinh \left (f x + e\right ) + {\left (b \cosh \left (f x + e\right ) + b \sinh \left (f x + e\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + b}{b}\right ) - {\left (b d f x + b d e\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} \log \left (\frac {a \cosh \left (f x + e\right ) + a \sinh \left (f x + e\right ) - {\left (b \cosh \left (f x + e\right ) + b \sinh \left (f x + e\right )\right )} \sqrt {\frac {a^{2} - b^{2}}{b^{2}}} + b}{b}\right )}{{\left (a^{2} - b^{2}\right )} f^{2}} \]
[In]
[Out]
\[ \int \frac {c+d x}{a+b \cosh (e+f x)} \, dx=\int \frac {c + d x}{a + b \cosh {\left (e + f x \right )}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {c+d x}{a+b \cosh (e+f x)} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
\[ \int \frac {c+d x}{a+b \cosh (e+f x)} \, dx=\int { \frac {d x + c}{b \cosh \left (f x + e\right ) + a} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {c+d x}{a+b \cosh (e+f x)} \, dx=\int \frac {c+d\,x}{a+b\,\mathrm {cosh}\left (e+f\,x\right )} \,d x \]
[In]
[Out]